<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddColumnRoleInTenantTable extends AbstractMigration
{
    public function up()
    {
        $this->table('tenant')
            ->addColumn('role', 'enum', ['values' => ['from_tenant', 'to_tenant'], 'default' => 'to_tenant', 'comment' => '租户权限'])
            ->save();
    }

    public function down()
    {
        $this->table('tenant')
            ->removeColumn('role')
            ->save();
    }
}
